package com.pug.message.mongoservice.sysmessage;

import com.pug.message.mongo.MessageMo;
import com.pug.message.mongo.SysMessageMo;
import com.pug.message.mongorepository.SysMessageRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.*;
import org.springframework.stereotype.Service;

/**
 * @author 飞哥
 * @Title: 学相伴出品
 * @Description: 飞哥B站地址：https://space.bilibili.com/490711252
 * 记得关注和三连哦！
 * @Description: 我们有一个学习网站：https://www.kuangstudy.com
 * @date 2022/3/26$ 21:21$
 */
@Service
@Slf4j
public class SysMessageServiceImpl implements ISysMessageService {

    @Autowired
    private SysMessageRepository sysMessageRepository;


    @Override
    public SysMessageMo saveMessage(SysMessageMo sysMessageMo) {
        sysMessageMo.setId(null);
        SysMessageMo sysMessageMo1 = sysMessageRepository.save(sysMessageMo);
        return sysMessageMo1;
    }
}
